package com.gmrz.uap.common;

import com.gmrz.uap.cfg.SystemConst;
import com.gmrz.uap.tenant.TenantService;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;

public class SystemInterceptor implements Interceptor {

    public void intercept(Invocation inv) {
        //将租户信息添加到每次请求
        inv.getController().setAttr(SystemConst.TENANTS, TenantService.me.getAllTenants());
        inv.invoke();
    }
}
